<template>
  <div>
    {{ msg }}
    <br />
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "fa",
  components: {},

  data() {
    return {
      name: "",
      data: "",
      msg: [],
    };
  },
  mounted: function () {
    this.getData();
  },
  methods: {
    getData: function () {
      //发送get请求
      axios
        .get("https://api.apiopen.top/getJoke?page=1&count=2&type=video")
        .then(
          function (res) {
            let result = res.data.result;
            console.log(result);
          },
          function () {
            console.log("请求失败处理");
          }
        );
    },
  },
};
</script>

<style>
</style>